import { FunctionComponent } from "react"
import { Outlet, Navigate } from "umi"

const Auth: FunctionComponent<any> = () => {
    const isLogin = localStorage.getItem("token");
    return (
        isLogin ? <Outlet /> : <Navigate to="/login" />
    )
}

export default Auth;